Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e94e50ea46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !looksLikeExplicitEphemeralSource(effectiveReq.Server) { | ||
| return resp, nil |
There was a problem hiding this comment.
Treat bare relative file paths as explicit sources
This new guard skips fallback unless looksLikeExplicitEphemeralSource is true, but that helper does not recognize valid relative file paths without / or a .json/.toml suffix (for example mcpx manifest ping {} when ./manifest is a JSON/TOML manifest). Before this commit those sources resolved via bootstrap.Resolve (which reads arbitrary file paths), so this change regresses legitimate ephemeral-source invocations into unknown server errors.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02c69f4480
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| info, err := statSourceFn(filepath.Clean(source)) | ||
| if err != nil { | ||
| return false | ||
| } | ||
| return info.Mode().IsRegular() |
There was a problem hiding this comment.
Keep typo handling from probing bare local files
The new os.Stat fallback makes any existing regular file look like an explicit source, so an invocation like mcpx ghub ping {} now enters ephemeral resolution whenever ./ghub exists, even if the user meant a server name and that file is unrelated. In this case parse/validation failures are surfaced as resolving source ... errors instead of the previous unknown server response, which regresses typo UX and reintroduces local-file influence for bare names in normal project directories.
Useful? React with 👍 / 👎.
Motivation
Description
sendServerRequestWithEphemeralFallbackto only attempt ephemeral source resolution when the requested server stringlooksLikeExplicitEphemeralSource(path/URL/install-link/json/toml/config-like) ininternal/cli/root.go.internal/cli/root_test.goto assertresolveSourceFnandcheckPrereqsFnare not invoked for implicit unknown-server fallbacks (typo names).://or?config=).Testing
go test ./internal/cliand the CLI tests passed.go vet ./...andgo build ./...which both succeeded.go test ./...which failed ininternal/configdue to unrelated, environment-dependent tests (TestLoadCodexConfigFileAddsCodexAppsServerFromAuthFileandTestLoadCodexConfigFileCodexAppsUsesConnectorsTokenEnv); the failures are preexisting and unrelated to this change.Codex Task